//
//  AXFCategroyTableViewCellBackgroundView.m
//  AXFEightGroup
//
//  Created by ya on 12/24/16.
//  Copyright © 2016 ya. All rights reserved.
//

#import "AXFCategroyTableViewCellBackgroundView.h"

@implementation AXFCategroyTableViewCellBackgroundView

- (void)drawRect:(CGRect)rect {
    [super drawRect:rect];

    CGFloat gap = 4.0;
    CGFloat length = rect.size.width - gap * 2;
    NSInteger count = length / 2.0;
    CGFloat startPointX = gap;
    UIBezierPath *path = [UIBezierPath bezierPath];
    for (int i = 0; i < count / 2; i ++) {
        [path moveToPoint:CGPointMake(startPointX + i * 2.0, rect.size.height + 1)];
        [path addLineToPoint:CGPointMake(startPointX + (i + 1) * 2.0, rect.size.height + 1)];
        startPointX += 2.0;
        [path setLineWidth:3.0 / [UIScreen mainScreen].scale];
        [[UIColor orangeColor] set];
        [path stroke];
    }
}

@end
